import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { HttpService } from 'http-service';


/**
 * Generated class for the HttpPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-http',
  templateUrl: 'http.html',
})
export class HttpPage {

  constructor(public navCtrl: NavController, public navParams: NavParams, public hs: HttpService) {
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad HttpPage');
  }

  gobak() {
    this.navCtrl.pop();
  }

  get_http() {
    let url = "http://112.74.86.172:8060/Mobile_Serv/push";
    this.hs.get(url).subscribe((ret) => {
      alert(JSON.stringify(ret));
    })
  }

}
